Skip to content

Conversation

Jack251970
Copy link
Member

@Jack251970 Jack251970 commented Sep 3, 2025

Add maximum results shown warning when always preview is on

Since preview panel requires a certain minimum height, maximum results shown may not take effect. So we need to add a warning to notify users for that. (I even thought this is a bug originally😢)

image

Test

When we enable the Always Preview and set a small number for maximum results shown, it will not take effect since preview panel requires a minimum height.

image image

@prlabeler prlabeler bot added the bug Something isn't working label Sep 3, 2025
@github-actions github-actions bot added this to the 2.0.0 milestone Sep 3, 2025
@Jack251970 Jack251970 requested a review from Copilot September 3, 2025 13:44
@Jack251970 Jack251970 enabled auto-merge September 3, 2025 13:44
@Jack251970 Jack251970 requested a review from onesounds September 3, 2025 13:45
Copy link

gitstream-cm bot commented Sep 3, 2025

🥷 Code experts: onesounds

onesounds, Jack251970 have most 👩‍💻 activity in the files.
onesounds, Jack251970 have most 🧠 knowledge in the files.

See details

Flow.Launcher/Languages/en.xaml

Activity based on git-commit:

onesounds Jack251970
SEP
AUG 4 additions & 0 deletions
JUL 48 additions & 13 deletions
JUN 7 additions & 6 deletions 21 additions & 0 deletions
MAY 15 additions & 2 deletions 33 additions & 4 deletions
APR 45 additions & 23 deletions 22 additions & 21 deletions

Knowledge based on git-blame:
onesounds: 36%
Jack251970: 21%

Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml

Activity based on git-commit:

onesounds Jack251970
SEP
AUG
JUL
JUN 12 additions & 4 deletions
MAY 2 additions & 2 deletions
APR 25 additions & 10 deletions 35 additions & 10 deletions

Knowledge based on git-blame:
onesounds: 78%
Jack251970: 4%

✨ Comment /gs review for LinearB AI review. Learn how to automate it here.

Copy link

gitstream-cm bot commented Sep 3, 2025

Be a legend 🏆 by adding a before and after screenshot of the changes you made, especially if they are around UI/UX.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a warning message to inform users that the "maximum results shown" setting may not work properly when "Always Preview" is enabled, since the preview panel requires a minimum height that could override the results limit.

  • Adds an InfoBar warning component that displays when Always Preview is enabled
  • Introduces a new localized warning message explaining the interaction between these two settings

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml Adds InfoBar warning component with visibility binding to AlwaysPreview setting
Flow.Launcher/Languages/en.xaml Adds localized warning message for the maximum results/always preview interaction

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@coderabbitai coderabbitai bot added the enhancement New feature or request label Sep 3, 2025
@Jack251970 Jack251970 removed the enhancement New feature or request label Sep 3, 2025
Copy link
Contributor

coderabbitai bot commented Sep 3, 2025

📝 Walkthrough

Walkthrough

Adds a localized warning string and displays an InfoBar in Theme settings. The InfoBar warns that “Max show results” may not apply when “Always Preview” is enabled. Visibility is bound to the AlwaysPreview setting via a BoolToVisibilityConverter. No logic changes beyond XAML bindings/resources.

Changes

Cohort / File(s) Summary of changes
Localization resource
Flow.Launcher/Languages/en.xaml
Added string resource MaxShowResultsCannotWorkWithAlwaysPreview explaining interaction between Always Preview and max results.
Theme settings UI
Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml
Inserted non-closable InfoBar after KeepMaxResults card. Binds Message to the new resource, Type=Warning, Visibility bound to Settings.AlwaysPreview via BoolToVisibilityConverter (OneWay, UpdateSourceTrigger=PropertyChanged).

Sequence Diagram(s)

sequenceDiagram
  actor User
  participant SettingsUI as SettingsPaneTheme.xaml
  participant Settings as Settings.AlwaysPreview
  participant Converter as BoolToVisibilityConverter
  participant InfoBar

  User->>SettingsUI: Toggle "Always Preview"
  SettingsUI->>Settings: Update AlwaysPreview value
  SettingsUI->>Converter: Convert(AlwaysPreview)
  Converter-->>SettingsUI: Visibility (Visible/Collapsed)
  SettingsUI->>InfoBar: Set Visibility, Bind Message (resource)
  Note over InfoBar: Shows warning when Always Preview = true
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • Organizing the settings page #3400 — Also adjusts SettingsPaneTheme.xaml and en.xaml for settings-related UI and localization changes, indicating closely related UI/resource updates.

Suggested labels

enhancement

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch always_preview_notification

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
Flow.Launcher/Languages/en.xaml (1)

330-330: Polish the copy for clarity and consistency with setting labels.

Current text is slightly awkward and missing articles. Suggested rewording adds punctuation and references the setting label verbatim.

Apply this diff:

-    <system:String x:Key="MaxShowResultsCannotWorkWithAlwaysPreview">Since Always Preview is on, maximum results shown may not take effect because preview panel requires a certain minimum height</system:String>
+    <system:String x:Key="MaxShowResultsCannotWorkWithAlwaysPreview">When Always Preview is enabled, Maximum results shown may not apply because the preview panel requires a minimum height.</system:String>
Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml (1)

548-556: Remove redundant attributes and empty Title.

Title="" renders no value and can be dropped; UpdateSourceTrigger is meaningless for OneWay bindings; Mode=OneWay is default. Simplify.

Apply this diff:

-            <cc:InfoBar
-                Title=""
-                Margin="0 4 0 0"
-                Closable="False"
-                IsIconVisible="True"
-                Length="Long"
-                Message="{DynamicResource MaxShowResultsCannotWorkWithAlwaysPreview}"
-                Type="Warning"
-                Visibility="{Binding Settings.AlwaysPreview, Converter={StaticResource BoolToVisibilityConverter}, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" />
+            <cc:InfoBar
+                Margin="0 4 0 0"
+                Closable="False"
+                IsIconVisible="True"
+                Length="Long"
+                Message="{DynamicResource MaxShowResultsCannotWorkWithAlwaysPreview}"
+                Type="Warning"
+                Visibility="{Binding Settings.AlwaysPreview, Converter={StaticResource BoolToVisibilityConverter}}" />
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 09366f5 and c8dedd5.

📒 Files selected for processing (2)
  • Flow.Launcher/Languages/en.xaml (1 hunks)
  • Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: gitStream.cm
  • GitHub Check: gitStream.cm
  • GitHub Check: build
🔇 Additional comments (3)
Flow.Launcher/Languages/en.xaml (1)

330-330: All locales include MaxShowResultsCannotWorkWithAlwaysPreview; no additional translations needed.

Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml (2)

548-556: Good UX addition—clear, contextual warning.


548-556: (Optional) Inspect HideableVisibilityConverter to confirm if it implements multi-boolean AND logic; if not, no existing AND converter—keep single binding.

@Jack251970 Jack251970 merged commit 6d02881 into dev Sep 4, 2025
17 checks passed
@Jack251970 Jack251970 deleted the always_preview_notification branch September 4, 2025 05:32
TBM13 pushed a commit to TBM13/Flow.Launcher that referenced this pull request Sep 17, 2025
…ew_notification

Add maximum results shown warning when always preview is on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants